---
title: assemble
---


import { Sandpack } from '@/components/Sandpack';


# assemble

Combine the Korean sentences and characters in the array received as input according to Korean language rules.

```typescript
function assemble(
  // An array containing Korean characters and sentences.
  fragments: string[]
): string
```



## Demo

<br />

<Sandpack>

```ts index.ts
import { assemble } from 'es-hangul';

console.log(assemble(['아버지가', ' ', '방ㅇ', 'ㅔ ', '들ㅇ', 'ㅓ갑니다']))
console.log(assemble(['아버지가', ' ', '방에 ', '들어갑니다']))
console.log(assemble(['ㅇ', 'ㅏ', 'ㅂ', 'ㅓ', 'ㅈ', 'ㅣ']))
```

</Sandpack>

